<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">MELGMM</b>
<td valign="baseline" align="right" class="function"><a href="../../probab/estimation/index.html" target="mdsdir"><img border = 0 src="../../up.gif"></a></table>
  <p><b>Maximizes Expectation of Log-Likelihood for Gaussian mixture.</b></p>
  <hr>
<div class='code'><code>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;melgmm(X,Alpha)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;melgmm(X,Alpha,cov_type)</span><br>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;melgmm(X,Alpha)&nbsp;maximizes&nbsp;expectation&nbsp;of&nbsp;log-likelihood&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;function&nbsp;for&nbsp;Gaussian&nbsp;mixture&nbsp;model</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;(Mean,Cov,Prior)&nbsp;=&nbsp;&nbsp;argmax&nbsp;&nbsp;F(Mean,Cov,Prior)</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mean,Cov,Prior&nbsp;</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;where</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;F&nbsp;=&nbsp;sum&nbsp;sum&nbsp;Alpha(j,i)*log(pdfgauss(X(:,i),Mean(:,y),Cov(:,:,y)))</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y&nbsp;&nbsp;&nbsp;i&nbsp;</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;The&nbsp;solution&nbsp;is&nbsp;returned&nbsp;in&nbsp;the&nbsp;structure&nbsp;model&nbsp;with&nbsp;fields</span><br>
<span class=help>&nbsp;&nbsp;Mean&nbsp;[dim&nbsp;x&nbsp;ncomp],&nbsp;Cov&nbsp;[dim&nbsp;x&nbsp;dim&nbsp;x&nbsp;ncomp]&nbsp;and&nbsp;Prior&nbsp;[1&nbsp;x&nbsp;ncomp].</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;melgmm(X,Alpha,cov_type)&nbsp;specifies&nbsp;covariance&nbsp;matrix:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;cov_type&nbsp;=&nbsp;'full'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;full&nbsp;covariance&nbsp;matrix&nbsp;(default)</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;cov_type&nbsp;=&nbsp;'diag'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;diagonal&nbsp;covarinace&nbsp;matrix</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;cov_type&nbsp;=&nbsp;'spherical'&nbsp;spherical&nbsp;covariance&nbsp;matrix</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Data&nbsp;sample.</span><br>
<span class=help>&nbsp;&nbsp;Alpha&nbsp;[ncomp&nbsp;x&nbsp;num_data]&nbsp;Distribution&nbsp;of&nbsp;hidden&nbsp;state&nbsp;given&nbsp;sample.</span><br>
<span class=help>&nbsp;&nbsp;cov_type&nbsp;[string]&nbsp;Type&nbsp;of&nbsp;covariacne&nbsp;matrix&nbsp;(see&nbsp;above).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Gaussian&nbsp;mixture&nbsp;model:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Mean&nbsp;[dim&nbsp;x&nbsp;ncomp]&nbsp;Mean&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Cov&nbsp;[dim&nbsp;x&nbsp;dim&nbsp;x&nbsp;ncomp]&nbsp;Covariance&nbsp;matrices.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Prior&nbsp;[1&nbsp;x&nbsp;ncomp]&nbsp;Distribution&nbsp;of&nbsp;hidden&nbsp;state.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=also_field>See also </span><span class=also></span><br>
<span class=help><span class=also>&nbsp;&nbsp;<a href = "../../probab/estimation/emgmm.html" target="mdsbody">EMGMM</a>,&nbsp;<a href = "../../probab/estimation/mlcgmm.html" target="mdsbody">MLCGMM</a>.</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../../probab/estimation/list/melgmm.html">melgmm.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 30-apr-2004, VF<br>
 19-sep-2003, VF<br>
 27-feb-2003, VF<br>

</body>
</html>
